import type { AliyunModelId } from "@roo-code/types"
import { aliyunDefaultModelId, aliyunModels } from "@roo-code/types"
import type { ApiHandlerOptions } from "../../shared/api"
import { BaseOpenAiCompatibleProvider } from "./base-openai-compatible-provider"

export class AliyunHandler extends BaseOpenAiCompatibleProvider<AliyunModelId> {
	constructor(options: ApiHandlerOptions) {
		super({
			...options,
			providerName: "阿里云通义千问",
			baseURL: "https://dashscope.aliyuncs.com/compatible-mode/v1",
			apiKey: options.aliyunApiKey,
			defaultProviderModelId: aliyunDefaultModelId,
			providerModels: aliyunModels,
			defaultTemperature: 0.7,
		})
	}
}
